package cn.ybx.seaIslands.models;

import java.util.ArrayList;

public class Island implements Comparable<Island> {
    private ArrayList<Point> landCoordinates = new ArrayList<>();

    public ArrayList<Point> getLandCoordinates() {
        return landCoordinates;
    }

    public void setLandCoordinates(ArrayList<Point> landCoordinates) {
        this.landCoordinates = landCoordinates;
    }

    @Override
    public int compareTo(Island o) {
        int thisSize = landCoordinates.size();
        int otherSize = o.getLandCoordinates().size();
        return Integer.compare(thisSize, otherSize);
    }
}
